package com.lyf.boot.base.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.lyf.boot.core.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.time.LocalDateTime;

/**
 * @author Luyufan
 * @date 2023/7/5 18:47
 */
@TableName("t_sys_user")
@Data
@EqualsAndHashCode(callSuper = true)
public class SysUser extends BaseEntity {

    @Serial
    private static final long serialVersionUID = -7972850058596229557L;

    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    private Long userId;

    /**
     * 账号
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 昵称
     */
    private String nickName;

    /**
     * 姓名
     */
    @TableField(value = "real_name", updateStrategy = FieldStrategy.ALWAYS)
    private String realName;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 电话号码
     */
    private String phoneNumber;

    /**
     * 邮箱地址
     */
    private String email;

    /**
     * 性别
     */
    private String gender;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 登录ip
     */
    private String loginIp;

    /**
     * 登录时间
     */
    private LocalDateTime loginTime;

    /**
     * 备注
     */
    private String remark;
}
